.class public Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;
.super Lcom/instagram/android/creation/widget/ActionBarHighlightButton;
.source "ActionBarCameraFlashButton.java"


# instance fields
.field private a:Landroid/graphics/drawable/Drawable;

.field private b:Landroid/graphics/drawable/Drawable;

.field private c:Landroid/graphics/drawable/Drawable;

.field private d:Lcom/instagram/android/creation/widget/d;

.field private e:Lcom/instagram/android/creation/widget/e;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .parameter "context"

    .prologue
    .line 40
    invoke-direct {p0, p1}, Lcom/instagram/android/creation/widget/ActionBarHighlightButton;-><init>(Landroid/content/Context;)V

    .line 35
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->d:Lcom/instagram/android/creation/widget/d;

    .line 37
    sget-object v0, Lcom/instagram/android/creation/widget/e;->b:Lcom/instagram/android/creation/widget/e;

    iput-object v0, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->e:Lcom/instagram/android/creation/widget/e;

    .line 41
    invoke-direct {p0}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->a()V

    .line 42
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1
    .parameter "context"
    .parameter "attrs"

    .prologue
    .line 45
    invoke-direct {p0, p1, p2}, Lcom/instagram/android/creation/widget/ActionBarHighlightButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 35
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->d:Lcom/instagram/android/creation/widget/d;

    .line 37
    sget-object v0, Lcom/instagram/android/creation/widget/e;->b:Lcom/instagram/android/creation/widget/e;

    iput-object v0, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->e:Lcom/instagram/android/creation/widget/e;

    .line 46
    invoke-direct {p0}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->a()V

    .line 47
    return-void
.end method

.method static synthetic a(Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;)Lcom/instagram/android/creation/widget/e;
    .locals 1
    .parameter

    .prologue
    .line 16
    iget-object v0, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->e:Lcom/instagram/android/creation/widget/e;

    return-object v0
.end method

.method private a()V
    .locals 2

    .prologue
    .line 50
    invoke-virtual {p0}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->getButtonDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->a:Landroid/graphics/drawable/Drawable;

    .line 51
    invoke-virtual {p0}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    sget v1, Lcom/facebook/av;->action_bar_glyph_flash_on:I

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->b:Landroid/graphics/drawable/Drawable;

    .line 52
    invoke-virtual {p0}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    sget v1, Lcom/facebook/av;->action_bar_glyph_flash_auto:I

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->c:Landroid/graphics/drawable/Drawable;

    .line 54
    new-instance v0, Lcom/instagram/android/creation/widget/a;

    invoke-direct {v0, p0}, Lcom/instagram/android/creation/widget/a;-><init>(Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;)V

    invoke-virtual {p0, v0}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V

    .line 61
    new-instance v0, Lcom/instagram/android/creation/widget/b;

    invoke-direct {v0, p0}, Lcom/instagram/android/creation/widget/b;-><init>(Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;)V

    invoke-super {p0, v0}, Lcom/instagram/android/creation/widget/ActionBarHighlightButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 82
    return-void
.end method

.method private b(Lcom/instagram/android/creation/widget/e;)Landroid/graphics/drawable/Drawable;
    .locals 2
    .parameter

    .prologue
    .line 101
    sget-object v0, Lcom/instagram/android/creation/widget/c;->a:[I

    invoke-virtual {p1}, Lcom/instagram/android/creation/widget/e;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    .line 108
    iget-object v0, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->a:Landroid/graphics/drawable/Drawable;

    :goto_0
    return-object v0

    .line 103
    :pswitch_0
    iget-object v0, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->b:Landroid/graphics/drawable/Drawable;

    goto :goto_0

    .line 105
    :pswitch_1
    iget-object v0, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->c:Landroid/graphics/drawable/Drawable;

    goto :goto_0

    .line 101
    :pswitch_data_0
    .packed-switch 0x2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method static synthetic b(Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;)Lcom/instagram/android/creation/widget/d;
    .locals 1
    .parameter

    .prologue
    .line 16
    iget-object v0, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->d:Lcom/instagram/android/creation/widget/d;

    return-object v0
.end method


# virtual methods
.method public a(Lcom/instagram/android/creation/widget/e;)V
    .locals 1
    .parameter

    .prologue
    .line 113
    iget-object v0, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->e:Lcom/instagram/android/creation/widget/e;

    if-ne p1, v0, :cond_0

    .line 119
    :goto_0
    return-void

    .line 116
    :cond_0
    invoke-direct {p0, p1}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->b(Lcom/instagram/android/creation/widget/e;)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    .line 117
    invoke-virtual {p0, v0}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->setButtonDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 118
    iput-object p1, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->e:Lcom/instagram/android/creation/widget/e;

    goto :goto_0
.end method

.method public setOnClickListener(Landroid/view/View$OnClickListener;)V
    .locals 2
    .parameter "l"
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .prologue
    .line 93
    new-instance v0, Ljava/lang/RuntimeException;

    const-string v1, "Use FlashButtonOnClickListener"

    invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public setOnClickListener(Lcom/instagram/android/creation/widget/d;)V
    .locals 0
    .parameter "listener"

    .prologue
    .line 97
    iput-object p1, p0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->d:Lcom/instagram/android/creation/widget/d;

    .line 98
    return-void
.end method
